function createIndustModel(obj,projectId,premisesId,buildingId,flag,industType){
				var test = $("#IndustModelFormLC input");
				$("#codeType_select").val("");
				$("#codeValue_indust").html("");
				for(var i=0;i<test.length;i++){
					test.eq(i).val("");
				}
				
				$("#IndustModelFormLC input[name='projectId']").val(projectId);
				$("#IndustModelFormLC input[name='premisesId']").val(premisesId);
				$("#IndustModelFormLC input[name='buildingId']").val(buildingId);
				$("#IndustModelFormLC input[name='industType']").val(industType);
				if(obj!=null){
					var industId=$(obj).attr("id");
					$.ajax({
						 url: jypath+"/estate/project/loadIndust",
					     type: "post",
					     dataType:'json', 
					     async:false,
					     data:{"id":industId},
					     success:function(data){
					    	 	initIndust(data.industType);
					    	 	$("#longIndust").val(data.industType);
					    	 	industChange($("#longIndust"),data.industMark);
				    			$("#IndustModelFormLC input[name='salableAcreag']").val(data.salableAcreag);
				    			$("#IndustModelFormLC input[name='targetValue']").val(data.targetValue);
				    			$("#IndustModelFormLC input[name='totalHouse']").val(data.totalHouse);
				    			$("#IndustModelFormLC input[name='numberOfBuildi']").val(data.numberOfBuildi);
				    			$("#IndustModelFormLC input[name='numberLayers']").val(data.numberLayers);
				    			$("#IndustModelFormLC input[name='selfSustaiAcreag']").val(data.selfSustaiAcreag);
				    			$("#IndustModelFormLC input[name='groundSalesAcreag']").val(data.groundSalesAcreag);
				    			$("#IndustModelFormLC input[name='undergSalesAcreag']").val(data.undergSalesAcreag);
				    			$("#IndustModelFormLC input[name='id']").val(data.id);
				    			
				    			for(var i=0;i<6;i++){
				    				$("#versionDate_info_"+i).val("");
				    				$("#versionValue_info_"+i).val("");
				    			}
				    			var verList = data.version;
				    			if(verList!=null&&verList.length>0){
				    				for(var i=0;i<verList.length;i++){
				    					$("#versionDate_info_"+verList[i].versionVal).val(JY.Object.notEmpty(JY.Date.Format(verList[i].effectStartTime,"yyyy-MM-dd")));
				    					$("#versionValue_info_"+verList[i].versionVal).val(JY.Object.notEmpty(verList[i].versionValue));
				    				}
				    			}
				    			 
					     }
					});
					
					JY.Model.editBig("IndustModelDiv",'编辑业态',function(){
						if(JY.Validate.form("IndustModelFormLC")){
							var that =$(this);
							JY.Ajax.doRequest("IndustModelFormLC",jypath+'/estate/project/createProjectIndust',null,function(data){
								layer.alert(data.resMsg);
								if(data.res==1){
									that.dialog("close");
									if(industType==0||industType==1||industType==null||industType==""){
										if(flag){
											toDetail('toSaleView', '2');
										}else{
											premisesIndust();
										}
									}else{
										loadBuilding(buildingId);
									}
									
								}
								
							});
						}
					});
	    			
				}else{
					JY.Model.editBig("IndustModelDiv",'新增业态',function(){
						if(JY.Validate.form("IndustModelFormLC")){
							var that =$(this);
							
							JY.Ajax.doRequest("IndustModelFormLC",jypath+'/estate/project/createProjectIndust',null,function(data){
								layer.alert(data.resMsg);
								if(data.res==1){
									that.dialog("close");
									if(industType==1||industType==2||industType==null||industType==""){
										if(flag){
											toDetail('toSaleView', '2');
										}else{
											premisesIndust();
										}
									}else{
										loadBuilding(buildingId);
									}
								}
								
								
							});
						}
					}); 
				}
			}

function loadBuilding(buildingId){
	var url = jypath+"/estate/projectBuilding/detail";
	var params = {
			id:buildingId,
			menu:'menu_0003_0001'
	};
	$.post(url,params,function(html){
		$("#rightContentDiv").html(html);
	});
}

function industChange(obj,id){
	var value_html = "<option value=''>请选择</option>";
	var c_url = jypath+"/system/baseCodeType/findBaseCodeValue";
	var typeId =  $(obj).val(); 
	if(typeId==null||typeId==""){
		$("#codeValue_indust").html("");
	}else{
		$.ajax({
			   type: "post",
	           url: c_url,
	           data: {typeId:typeId},
	           dataType: "json",
	           success: function(data){
	           		if(data!=null&&data.length>0){
	           			for(var i=0;i<data.length;i++){
	           				if(id!=null&&data[i].id==id){
	           					value_html+="<option selected='selected' value ='"+data[i].id+"'>"+data[i].codeName+"</option>";
	           					
	           				}else{
	           					value_html+="<option value ='"+data[i].id+"'>"+data[i].codeName+"</option>";
	           				}
	           				
	           			}
	           		}
	           		$("#codeValue_indust").html(value_html);
	           		if(id!=null){
	           			var codeValue = $("#codeValue_indust");
			    		industCarChange(codeValue);
	           		}
	           }
		});
	}
}

function industCarChange(obj){
	var value = $(obj).val();
	var industText = $("#codeValue_indust").find("option:selected").text();
	var array=['totalHouse','numberOfBuildi','numberLayers','selfSustaiAcreag','groundSalesAcreag','undergSalesAcreag'];
	if(industText==null){
		$("#salableAcreag").html("可售面积");
		for(var i=0;i<array.length;i++){
			$("#IndustModelFormLC input[name='"+array[i]+"']").attr("disabled",false);
		}
	}else if(industText=='车位'){
		$("#salableAcreag").html("可售车位数(个)");
		for(var i=0;i<array.length;i++){
			$("#IndustModelFormLC input[name='"+array[i]+"']").attr("disabled",true);
		}
	}else if(industText!='车位'){
		$("#salableAcreag").html("可售面积");
		for(var i=0;i<array.length;i++){
			$("#IndustModelFormLC input[name='"+array[i]+"']").attr("disabled",false);
		}
	}
}

function initIndust(value){
	var url = jypath+"/system/baseCodeType/findBusList"
		var cus_html = "<option value=''>请选择</option>";
		$("#codeType_select").html("");
		$.ajax({
			   type: "post",
	           url: url,
	           data: {},
	           dataType: "json",
	           success: function(data){
	           		if(data!=null&&data.length>0){
	           			for(var i=0;i<data.length;i++){
	           				if(data[i].id==value){
	           					cus_html+="<option selected='selected' value ='"+data[i].id+"'>"+data[i].typeName+"</option>";
	           				}else{
	           					cus_html+="<option value ='"+data[i].id+"'>"+data[i].typeName+"</option>";
	           				}
	           				
	           			}
	           		}
	           		$("#codeType_select").html(cus_html);
	           }
		});
}